package com.lais.record.base;

import com.lais.record.common.utils.IdWorker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @Author: luowen
 * @Description: 基本功能启动类
 * @Date: Create in 23:28 2019/11/26
 */
@SpringBootApplication(scanBasePackages = {"com.lais.record.base","com.lais.record.common.exception"})
@MapperScan("com.lais.record.base.mapper")
@EnableDiscoveryClient
@EnableTransactionManagement
public class BaseApplication {

    public static void main(String[] args) {
        SpringApplication.run(BaseApplication.class, args);
    }

    @Bean
    public IdWorker idWorker() {
        return new IdWorker(0, 1);
    }
}
